Integrand size = 20, antiderivative size = 113 \[ \int \left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=-b d^2 n x-\frac {2 b d e n x^{1+r}}{(1+r)^2}-\frac {b e^2 n x^{1+2 r}}{(1+2 r)^2}+d^2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 d e x^{1+r} \left (a+b \log \left (c x^n\right )\right )}{1+r}+\frac {e^2 x^{1+2 r} \left (a+b \log \left (c x^n\right )\right )}{1+2 r} \]
-b*d^2*n*x-2*b*d*e*n*x^(1+r)/(1+r)^2-b*e^2*n*x^(1+2*r)/(1+2*r)^2+d^2*x*(a+ b*ln(c*x^n))+2*d*e*x^(1+r)*(a+b*ln(c*x^n))/(1+r)+e^2*x^(1+2*r)*(a+b*ln(c*x ^n))/(1+2*r)
Time = 0.11 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.95 \[ \int \left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=x \left (a d^2-b d^2 n-\frac {2 b d e n x^r}{(1+r)^2}-\frac {b e^2 n x^{2 r}}{(1+2 r)^2}+b d^2 \log \left (c x^n\right )+\frac {2 d e x^r \left (a+b \log \left (c x^n\right )\right )}{1+r}+\frac {e^2 x^{2 r} \left (a+b \log \left (c x^n\right )\right )}{1+2 r}\right ) \]
x*(a*d^2 - b*d^2*n - (2*b*d*e*n*x^r)/(1 + r)^2 - (b*e^2*n*x^(2*r))/(1 + 2* r)^2 + b*d^2*Log[c*x^n] + (2*d*e*x^r*(a + b*Log[c*x^n]))/(1 + r) + (e^2*x^ (2*r)*(a + b*Log[c*x^n]))/(1 + 2*r))
Time = 0.29 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.97, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2750, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right ) \, dx\) |
\(\Big \downarrow \) 2750 |
\(\displaystyle -b n \int \left (\frac {2 d e x^r}{r+1}+\frac {e^2 x^{2 r}}{2 r+1}+d^2\right )dx+d^2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 d e x^{r+1} \left (a+b \log \left (c x^n\right )\right )}{r+1}+\frac {e^2 x^{2 r+1} \left (a+b \log \left (c x^n\right )\right )}{2 r+1}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle d^2 x \left (a+b \log \left (c x^n\right )\right )+\frac {2 d e x^{r+1} \left (a+b \log \left (c x^n\right )\right )}{r+1}+\frac {e^2 x^{2 r+1} \left (a+b \log \left (c x^n\right )\right )}{2 r+1}-b n \left (d^2 x+\frac {2 d e x^{r+1}}{(r+1)^2}+\frac {e^2 x^{2 r+1}}{(2 r+1)^2}\right )\) |
-(b*n*(d^2*x + (2*d*e*x^(1 + r))/(1 + r)^2 + (e^2*x^(1 + 2*r))/(1 + 2*r)^2 )) + d^2*x*(a + b*Log[c*x^n]) + (2*d*e*x^(1 + r)*(a + b*Log[c*x^n]))/(1 + r) + (e^2*x^(1 + 2*r)*(a + b*Log[c*x^n]))/(1 + 2*r)
3.4.87.3.1 Defintions of rubi rules used
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = IntHide[(d + e*x^r)^q, x]}, Simp[(a + b*Log[c*x^n]) u, x] - Simp[b*n Int[SimplifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(508\) vs. \(2(113)=226\).
Time = 1.01 (sec) , antiderivative size = 509, normalized size of antiderivative = 4.50
method | result | size |
parallelrisch | \(-\frac {-8 x \,x^{r} \ln \left (c \,x^{n}\right ) b d e \,r^{3}-16 x \,x^{r} \ln \left (c \,x^{n}\right ) b d e \,r^{2}-8 x \,x^{r} r^{3} a d e -4 x \ln \left (c \,x^{n}\right ) b \,d^{2} r^{4}+2 x \,x^{r} b d e n -12 x \ln \left (c \,x^{n}\right ) b \,d^{2} r^{3}-2 x d e \,x^{r} b \ln \left (c \,x^{n}\right )-x b \ln \left (c \,x^{n}\right ) d^{2}-10 x \,x^{r} \ln \left (c \,x^{n}\right ) b d e r -6 x \ln \left (c \,x^{n}\right ) b \,d^{2} r +12 x b \,d^{2} n \,r^{3}+13 x b \,d^{2} n \,r^{2}+6 x b \,d^{2} n r +4 x b \,d^{2} n \,r^{4}+8 x \,x^{r} b d e n \,r^{2}+8 x \,x^{r} b d e n r -a \,d^{2} x -2 x d e \,x^{r} a -13 x \ln \left (c \,x^{n}\right ) b \,d^{2} r^{2}-4 x a \,d^{2} r^{4}-12 x a \,d^{2} r^{3}-13 x a \,d^{2} r^{2}-6 x a \,d^{2} r -4 x \,x^{2 r} a \,e^{2} r -x \,e^{2} x^{2 r} b \ln \left (c \,x^{n}\right )+x \,x^{2 r} b \,e^{2} n -2 x \,x^{2 r} a \,e^{2} r^{3}-5 x \,x^{2 r} a \,e^{2} r^{2}-4 x \,x^{2 r} \ln \left (c \,x^{n}\right ) b \,e^{2} r +x \,x^{2 r} b \,e^{2} n \,r^{2}+2 x \,x^{2 r} b \,e^{2} n r -2 x \,x^{2 r} \ln \left (c \,x^{n}\right ) b \,e^{2} r^{3}-5 x \,x^{2 r} \ln \left (c \,x^{n}\right ) b \,e^{2} r^{2}-x \,e^{2} x^{2 r} a -10 x \,x^{r} r a d e -16 x \,x^{r} a d e \,r^{2}+b \,d^{2} n x}{\left (1+2 r \right )^{2} \left (r^{2}+2 r +1\right )}\) | \(509\) |
risch | \(\text {Expression too large to display}\) | \(1921\) |
-(-8*x*x^r*ln(c*x^n)*b*d*e*r^3-16*x*x^r*ln(c*x^n)*b*d*e*r^2-4*x*(x^r)^2*ln (c*x^n)*b*e^2*r-8*x*x^r*r^3*a*d*e-4*x*(x^r)^2*a*e^2*r-4*x*ln(c*x^n)*b*d^2* r^4+x*(x^r)^2*b*e^2*n*r^2+2*x*(x^r)^2*b*e^2*n*r+2*x*x^r*b*d*e*n-12*x*ln(c* x^n)*b*d^2*r^3-2*x*d*e*x^r*b*ln(c*x^n)-x*b*ln(c*x^n)*d^2-x*e^2*(x^r)^2*a-1 0*x*x^r*ln(c*x^n)*b*d*e*r-2*x*(x^r)^2*ln(c*x^n)*b*e^2*r^3-5*x*(x^r)^2*ln(c *x^n)*b*e^2*r^2-x*e^2*(x^r)^2*b*ln(c*x^n)-6*x*ln(c*x^n)*b*d^2*r+12*x*b*d^2 *n*r^3+x*(x^r)^2*b*e^2*n+13*x*b*d^2*n*r^2+6*x*b*d^2*n*r+4*x*b*d^2*n*r^4+8* x*x^r*b*d*e*n*r^2+8*x*x^r*b*d*e*n*r-a*d^2*x-2*x*d*e*x^r*a-2*x*(x^r)^2*a*e^ 2*r^3-13*x*ln(c*x^n)*b*d^2*r^2-4*x*a*d^2*r^4-12*x*a*d^2*r^3-13*x*a*d^2*r^2 -6*x*a*d^2*r-5*x*(x^r)^2*a*e^2*r^2-10*x*x^r*r*a*d*e-16*x*x^r*a*d*e*r^2+b*d ^2*n*x)/(1+2*r)^2/(r^2+2*r+1)
Leaf count of result is larger than twice the leaf count of optimal. 466 vs. \(2 (113) = 226\).
Time = 0.32 (sec) , antiderivative size = 466, normalized size of antiderivative = 4.12 \[ \int \left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {{\left (4 \, b d^{2} r^{4} + 12 \, b d^{2} r^{3} + 13 \, b d^{2} r^{2} + 6 \, b d^{2} r + b d^{2}\right )} x \log \left (c\right ) + {\left (4 \, b d^{2} n r^{4} + 12 \, b d^{2} n r^{3} + 13 \, b d^{2} n r^{2} + 6 \, b d^{2} n r + b d^{2} n\right )} x \log \left (x\right ) - {\left (4 \, {\left (b d^{2} n - a d^{2}\right )} r^{4} + b d^{2} n + 12 \, {\left (b d^{2} n - a d^{2}\right )} r^{3} - a d^{2} + 13 \, {\left (b d^{2} n - a d^{2}\right )} r^{2} + 6 \, {\left (b d^{2} n - a d^{2}\right )} r\right )} x + {\left ({\left (2 \, b e^{2} r^{3} + 5 \, b e^{2} r^{2} + 4 \, b e^{2} r + b e^{2}\right )} x \log \left (c\right ) + {\left (2 \, b e^{2} n r^{3} + 5 \, b e^{2} n r^{2} + 4 \, b e^{2} n r + b e^{2} n\right )} x \log \left (x\right ) + {\left (2 \, a e^{2} r^{3} - b e^{2} n + a e^{2} - {\left (b e^{2} n - 5 \, a e^{2}\right )} r^{2} - 2 \, {\left (b e^{2} n - 2 \, a e^{2}\right )} r\right )} x\right )} x^{2 \, r} + 2 \, {\left ({\left (4 \, b d e r^{3} + 8 \, b d e r^{2} + 5 \, b d e r + b d e\right )} x \log \left (c\right ) + {\left (4 \, b d e n r^{3} + 8 \, b d e n r^{2} + 5 \, b d e n r + b d e n\right )} x \log \left (x\right ) + {\left (4 \, a d e r^{3} - b d e n + a d e - 4 \, {\left (b d e n - 2 \, a d e\right )} r^{2} - {\left (4 \, b d e n - 5 \, a d e\right )} r\right )} x\right )} x^{r}}{4 \, r^{4} + 12 \, r^{3} + 13 \, r^{2} + 6 \, r + 1} \]
((4*b*d^2*r^4 + 12*b*d^2*r^3 + 13*b*d^2*r^2 + 6*b*d^2*r + b*d^2)*x*log(c) + (4*b*d^2*n*r^4 + 12*b*d^2*n*r^3 + 13*b*d^2*n*r^2 + 6*b*d^2*n*r + b*d^2*n )*x*log(x) - (4*(b*d^2*n - a*d^2)*r^4 + b*d^2*n + 12*(b*d^2*n - a*d^2)*r^3 - a*d^2 + 13*(b*d^2*n - a*d^2)*r^2 + 6*(b*d^2*n - a*d^2)*r)*x + ((2*b*e^2 *r^3 + 5*b*e^2*r^2 + 4*b*e^2*r + b*e^2)*x*log(c) + (2*b*e^2*n*r^3 + 5*b*e^ 2*n*r^2 + 4*b*e^2*n*r + b*e^2*n)*x*log(x) + (2*a*e^2*r^3 - b*e^2*n + a*e^2 - (b*e^2*n - 5*a*e^2)*r^2 - 2*(b*e^2*n - 2*a*e^2)*r)*x)*x^(2*r) + 2*((4*b *d*e*r^3 + 8*b*d*e*r^2 + 5*b*d*e*r + b*d*e)*x*log(c) + (4*b*d*e*n*r^3 + 8* b*d*e*n*r^2 + 5*b*d*e*n*r + b*d*e*n)*x*log(x) + (4*a*d*e*r^3 - b*d*e*n + a *d*e - 4*(b*d*e*n - 2*a*d*e)*r^2 - (4*b*d*e*n - 5*a*d*e)*r)*x)*x^r)/(4*r^4 + 12*r^3 + 13*r^2 + 6*r + 1)
Time = 2.28 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.87 \[ \int \left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=a d^{2} x + 2 a d e \left (\begin {cases} \frac {x^{r + 1}}{r + 1} & \text {for}\: r \neq -1 \\\log {\left (x \right )} & \text {otherwise} \end {cases}\right ) + a e^{2} \left (\begin {cases} \frac {x^{2 r + 1}}{2 r + 1} & \text {for}\: r \neq - \frac {1}{2} \\\log {\left (x \right )} & \text {otherwise} \end {cases}\right ) - b d^{2} n x + b d^{2} x \log {\left (c x^{n} \right )} - 2 b d e n \left (\begin {cases} \frac {\begin {cases} \frac {x^{r + 1}}{r + 1} & \text {for}\: r \neq -1 \\\log {\left (x \right )} & \text {otherwise} \end {cases}}{r + 1} & \text {for}\: r > -\infty \wedge r < \infty \wedge r \neq -1 \\\frac {\log {\left (x \right )}^{2}}{2} & \text {otherwise} \end {cases}\right ) + 2 b d e \left (\begin {cases} \frac {x^{r + 1}}{r + 1} & \text {for}\: r \neq -1 \\\log {\left (x \right )} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )} - b e^{2} n \left (\begin {cases} \frac {\begin {cases} \frac {x^{2 r + 1}}{2 r + 1} & \text {for}\: r \neq - \frac {1}{2} \\\log {\left (x \right )} & \text {otherwise} \end {cases}}{2 r + 1} & \text {for}\: r > -\infty \wedge r < \infty \wedge r \neq - \frac {1}{2} \\\frac {\log {\left (x \right )}^{2}}{2} & \text {otherwise} \end {cases}\right ) + b e^{2} \left (\begin {cases} \frac {x^{2 r + 1}}{2 r + 1} & \text {for}\: r \neq - \frac {1}{2} \\\log {\left (x \right )} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )} \]
a*d**2*x + 2*a*d*e*Piecewise((x**(r + 1)/(r + 1), Ne(r, -1)), (log(x), Tru e)) + a*e**2*Piecewise((x**(2*r + 1)/(2*r + 1), Ne(r, -1/2)), (log(x), Tru e)) - b*d**2*n*x + b*d**2*x*log(c*x**n) - 2*b*d*e*n*Piecewise((Piecewise(( x**(r + 1)/(r + 1), Ne(r, -1)), (log(x), True))/(r + 1), (r > -oo) & (r < oo) & Ne(r, -1)), (log(x)**2/2, True)) + 2*b*d*e*Piecewise((x**(r + 1)/(r + 1), Ne(r, -1)), (log(x), True))*log(c*x**n) - b*e**2*n*Piecewise((Piecew ise((x**(2*r + 1)/(2*r + 1), Ne(r, -1/2)), (log(x), True))/(2*r + 1), (r > -oo) & (r < oo) & Ne(r, -1/2)), (log(x)**2/2, True)) + b*e**2*Piecewise(( x**(2*r + 1)/(2*r + 1), Ne(r, -1/2)), (log(x), True))*log(c*x**n)
Time = 0.18 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.27 \[ \int \left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=-b d^{2} n x + b d^{2} x \log \left (c x^{n}\right ) + a d^{2} x + \frac {b e^{2} x^{2 \, r + 1} \log \left (c x^{n}\right )}{2 \, r + 1} + \frac {2 \, b d e x^{r + 1} \log \left (c x^{n}\right )}{r + 1} - \frac {b e^{2} n x^{2 \, r + 1}}{{\left (2 \, r + 1\right )}^{2}} + \frac {a e^{2} x^{2 \, r + 1}}{2 \, r + 1} - \frac {2 \, b d e n x^{r + 1}}{{\left (r + 1\right )}^{2}} + \frac {2 \, a d e x^{r + 1}}{r + 1} \]
-b*d^2*n*x + b*d^2*x*log(c*x^n) + a*d^2*x + b*e^2*x^(2*r + 1)*log(c*x^n)/( 2*r + 1) + 2*b*d*e*x^(r + 1)*log(c*x^n)/(r + 1) - b*e^2*n*x^(2*r + 1)/(2*r + 1)^2 + a*e^2*x^(2*r + 1)/(2*r + 1) - 2*b*d*e*n*x^(r + 1)/(r + 1)^2 + 2* a*d*e*x^(r + 1)/(r + 1)
Leaf count of result is larger than twice the leaf count of optimal. 244 vs. \(2 (113) = 226\).
Time = 0.34 (sec) , antiderivative size = 244, normalized size of antiderivative = 2.16 \[ \int \left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {2 \, b e^{2} n r x x^{2 \, r} \log \left (x\right )}{4 \, r^{2} + 4 \, r + 1} + \frac {2 \, b d e n r x x^{r} \log \left (x\right )}{r^{2} + 2 \, r + 1} + b d^{2} n x \log \left (x\right ) + \frac {b e^{2} n x x^{2 \, r} \log \left (x\right )}{4 \, r^{2} + 4 \, r + 1} + \frac {2 \, b d e n x x^{r} \log \left (x\right )}{r^{2} + 2 \, r + 1} - b d^{2} n x - \frac {b e^{2} n x x^{2 \, r}}{4 \, r^{2} + 4 \, r + 1} - \frac {2 \, b d e n x x^{r}}{r^{2} + 2 \, r + 1} + b d^{2} x \log \left (c\right ) + \frac {b e^{2} x x^{2 \, r} \log \left (c\right )}{2 \, r + 1} + \frac {2 \, b d e x x^{r} \log \left (c\right )}{r + 1} + a d^{2} x + \frac {a e^{2} x x^{2 \, r}}{2 \, r + 1} + \frac {2 \, a d e x x^{r}}{r + 1} \]
2*b*e^2*n*r*x*x^(2*r)*log(x)/(4*r^2 + 4*r + 1) + 2*b*d*e*n*r*x*x^r*log(x)/ (r^2 + 2*r + 1) + b*d^2*n*x*log(x) + b*e^2*n*x*x^(2*r)*log(x)/(4*r^2 + 4*r + 1) + 2*b*d*e*n*x*x^r*log(x)/(r^2 + 2*r + 1) - b*d^2*n*x - b*e^2*n*x*x^( 2*r)/(4*r^2 + 4*r + 1) - 2*b*d*e*n*x*x^r/(r^2 + 2*r + 1) + b*d^2*x*log(c) + b*e^2*x*x^(2*r)*log(c)/(2*r + 1) + 2*b*d*e*x*x^r*log(c)/(r + 1) + a*d^2* x + a*e^2*x*x^(2*r)/(2*r + 1) + 2*a*d*e*x*x^r/(r + 1)
Timed out. \[ \int \left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right ) \, dx=\int {\left (d+e\,x^r\right )}^2\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \]